<?php
require_once 'init.php';

$page = cf\api\page\get('main');
$smarty->assign('page',$page);
$smarty->assign('pageText',cf\api\page\getText($page['id']));

$smarty->assign(
	'references',
	cf\query2arrays("
		SELECT short_txt AS author, txt AS text, icon AS signature 
		FROM cf_page 
		WHERE (hidden IS NULL OR hidden=0) AND parent_id=:id
		ORDER BY sort_order ASC
		LIMIT 3",
		array('id'=>cf\api\page\getID('references'))
	)
);

$smarty->display('index.tpl');
?>